# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[self.task_list = []
self._RecordingTaskRunner__global_start_time = 0
self._RecordingTaskRunner__global_stop_time = 0
self.live = live
self.ext_disk_space = ext_disk_space
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76319ec>}
nname: 0
n 0(None)[return self.task_list
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb763168c>}
nname: 44
n 44(None)[return False
]:
	i: 0(AL), 43()
	o: 

nname: 43
n 43(None)[]:
	i: 3(AF), 39()
	o: 44()

nname: 39
n 39(None)[]:
	i: 13(f), 31()
	o: 43()

nname: 31
n 31(None)[return True
continue
]:
	i: 13(t)
	o: 39()

nname: 13
n 13(rec.type != RECORDING_TYPE_NOT_SCHEDULED)[for rec in self.task_list:
]:
	i: 3(for)
	o: 31(t), 39(f)

nname: 3
n 3(None)[]:
	i: 0(loop)
	o: 13(for), 43(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(loop), 44(AL)

nname: 44
n 44(None)[return False
]:
	i: 0(AL), 3(AF), 13()
	o: 

nname: 13
n 13(None)[for rec in self.task_list:
if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
	return True
	continue
]:
	i: 3(for)
	o: 44()

nname: 3
n 3(None)[]:
	i: 0(loop)
	o: 13(for), 44(AF)

nname: 0
n 0(None)[]:
	i: 
	o: 3(loop), 44(AL)

nname: 13
n 13(None)[for rec in self.task_list:
	if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
		return True
		continue
return False
]:
	i: 0(for)
	o: 

nname: 0
n 0(None)[]:
	i: 
	o: 13(for)

nname: 0
n 0(None)[for rec in self.task_list:
	if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
		return True
		continue
return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7631f0c>}
nname: 0
n 0(None)[self.task_list.append(rec)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb763186c>}
nname: 0
n 0(None)[self.task_list.remove(rec)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76317ec>}
nname: 71
n 71(None)[return self._RecordingTaskRunner__global_start_time
]:
	i: 9(), 59()
	o: 

nname: 59
n 59(None)[del _[1]
]:
	i: 22(AF), 43()
	o: 71()

nname: 43
n 43(None)[for rec in self.task_list:
]:
	i: 22(for)
	o: 59()

nname: 22
n 22(None)[]:
	i: 0(t)
	o: 43(for), 59(AF)

nname: 9
n 9(None)[_[1], self._RecordingTaskRunner__global_start_time, self._RecordingTaskRunner__global_start_time = [], [](self.task_list), 0
]:
	i: 0(f)
	o: 71()

nname: 0
n 0(self.task_list)[]:
	i: 
	o: 9(f), 22(t)

self.nodes: {0: <unpyclib.structure.node instance at 0xb7631e4c>, 71: <unpyclib.structure.node instance at 0xb76318ac>, 9: <unpyclib.structure.node instance at 0xb7631eec>, 43: <unpyclib.structure.node instance at 0xb7631e2c>, 22: <unpyclib.structure.node instance at 0xb7631fac>, 59: <unpyclib.structure.node instance at 0xb7631f6c>}
nname: 0
n 0(None)[self._RecordingTaskRunner__global_start_time = global_start_time
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76317ec>}
nname: 103
n 103(None)[return self._RecordingTaskRunner__global_stop_time
]:
	i: 9(), 74(), 87()
	o: 

nname: 87
n 87(None)[]:
	i: 56(f)
	o: 103()

nname: 74
n 74(None)[]:
	i: 56(t)
	o: 103()

nname: 56
n 56(0 in stop_time_list)[del _[1]
for stop_time_list in self.task_list:
]:
	i: 22(AF), 40()
	o: 74(t), 87(f)

nname: 40
n 40(None)[for rec in self.task_list:
]:
	i: 22(for)
	o: 56()

nname: 22
n 22(None)[]:
	i: 0(t)
	o: 40(for), 56(AF)

nname: 9
n 9(None)[_[1], self._RecordingTaskRunner__global_stop_time, self._RecordingTaskRunner__global_stop_time, self._RecordingTaskRunner__global_stop_time = [], max(stop_time_list), 0, 0
]:
	i: 0(f)
	o: 103()

nname: 0
n 0(self.task_list)[]:
	i: 
	o: 9(f), 22(t)

nname: 103
n 103(None)[return self._RecordingTaskRunner__global_stop_time
]:
	i: 9(), 56()
	o: 

nname: 56
n 56(None)[del _[1]
for stop_time_list in self.task_list:
if 0 in stop_time_list:
	pass
]:
	i: 22(AF), 40()
	o: 103()

nname: 40
n 40(None)[for rec in self.task_list:
]:
	i: 22(for)
	o: 56()

nname: 22
n 22(None)[]:
	i: 0(t)
	o: 40(for), 56(AF)

nname: 9
n 9(None)[_[1], self._RecordingTaskRunner__global_stop_time, self._RecordingTaskRunner__global_stop_time, self._RecordingTaskRunner__global_stop_time = [], max(stop_time_list), 0, 0
]:
	i: 0(f)
	o: 103()

nname: 0
n 0(self.task_list)[]:
	i: 
	o: 9(f), 22(t)

self.nodes: {0: <unpyclib.structure.node instance at 0xb7631e0c>, 103: <unpyclib.structure.node instance at 0xb763450c>, 40: <unpyclib.structure.node instance at 0xb7631dcc>, 9: <unpyclib.structure.node instance at 0xb7631e4c>, 22: <unpyclib.structure.node instance at 0xb7631cac>, 56: <unpyclib.structure.node instance at 0xb7631fcc>}
nname: 0
n 0(None)[self._RecordingTaskRunner__global_stop_time = global_stop_time
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7631d6c>}
nname: 6
n 6(None)[def __init__(self, live, ext_disk_space):
	self.task_list = []
	self._RecordingTaskRunner__global_start_time = 0
	self._RecordingTaskRunner__global_stop_time = 0
	self.live = live
	self.ext_disk_space = ext_disk_space

def getTaskList(self):
	return self.task_list

def containsSchedule(self):
	for rec in self.task_list:
		if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
			return True
			continue
	return False

def beginRec(self, rec):
	self.task_list.append(rec)
	return True

def endRec(self, rec):
	self.task_list.remove(rec)

def _RecordingTaskRunner__get_global_start_time(self):
	pass

def _RecordingTaskRunner__set_global_start_time(self, global_start_time):
	self._RecordingTaskRunner__global_start_time = global_start_time

global_start_time = property(fget=_RecordingTaskRunner__get_global_start_time, fset=_RecordingTaskRunner__set_global_start_time)
def _RecordingTaskRunner__get_global_stop_time(self):
	pass

def _RecordingTaskRunner__set_global_stop_time(self, global_stop_time):
	self._RecordingTaskRunner__global_stop_time = global_stop_time

global_stop_time = property(fget=_RecordingTaskRunner__get_global_stop_time, fset=_RecordingTaskRunner__set_global_stop_time)
]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7627e6c>}
nname: 0
n 0(None)[from logger import log
from recording import RECORDING_TYPE_NOT_SCHEDULED
from config import *
class RecordingTaskRunner(object):
	def __init__(self, live, ext_disk_space):
		self.task_list = []
		self._RecordingTaskRunner__global_start_time = 0
		self._RecordingTaskRunner__global_stop_time = 0
		self.live = live
		self.ext_disk_space = ext_disk_space

	def getTaskList(self):
		return self.task_list

	def containsSchedule(self):
		for rec in self.task_list:
			if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
				return True
				continue
		return False

	def beginRec(self, rec):
		self.task_list.append(rec)
		return True

	def endRec(self, rec):
		self.task_list.remove(rec)

	def _RecordingTaskRunner__get_global_start_time(self):
		pass

	def _RecordingTaskRunner__set_global_start_time(self, global_start_time):
		self._RecordingTaskRunner__global_start_time = global_start_time

	global_start_time = property(fget=_RecordingTaskRunner__get_global_start_time, fset=_RecordingTaskRunner__set_global_start_time)
	def _RecordingTaskRunner__get_global_stop_time(self):
		pass

	def _RecordingTaskRunner__set_global_stop_time(self, global_stop_time):
		self._RecordingTaskRunner__global_stop_time = global_stop_time

	global_stop_time = property(fget=_RecordingTaskRunner__get_global_stop_time, fset=_RecordingTaskRunner__set_global_stop_time)


]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762748c>}
from logger import log
from recording import RECORDING_TYPE_NOT_SCHEDULED
from config import *
class RecordingTaskRunner(object):
	def __init__(self, live, ext_disk_space):
		self.task_list = []
		self._RecordingTaskRunner__global_start_time = 0
		self._RecordingTaskRunner__global_stop_time = 0
		self.live = live
		self.ext_disk_space = ext_disk_space

	def getTaskList(self):
		return self.task_list

	def containsSchedule(self):
		for rec in self.task_list:
			if rec.type != RECORDING_TYPE_NOT_SCHEDULED:
				return True
				continue
		return False

	def beginRec(self, rec):
		self.task_list.append(rec)
		return True

	def endRec(self, rec):
		self.task_list.remove(rec)

	def _RecordingTaskRunner__get_global_start_time(self):
		pass

	def _RecordingTaskRunner__set_global_start_time(self, global_start_time):
		self._RecordingTaskRunner__global_start_time = global_start_time

	global_start_time = property(fget=_RecordingTaskRunner__get_global_start_time, fset=_RecordingTaskRunner__set_global_start_time)
	def _RecordingTaskRunner__get_global_stop_time(self):
		pass

	def _RecordingTaskRunner__set_global_stop_time(self, global_stop_time):
		self._RecordingTaskRunner__global_stop_time = global_stop_time

	global_stop_time = property(fget=_RecordingTaskRunner__get_global_stop_time, fset=_RecordingTaskRunner__set_global_stop_time)


